<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>当前项目</title>
    <link rel="stylesheet" href="../resource/mp/_assets/css/scrollbar.css?_v=20150112">
    <jsp:include page="../../../main/mp/inc.jsp"	/>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript">
        document.addEventListener('touchmove', function(e) {
            e.preventDefault();
        }, false);

        $(function(){
            loadListviewScroll($("#listview-content"),{},function(rdata){
                if(rdata.result.errorCode=1){
                    $("#proBcakTmpl").tmpl(rdata.data).appendTo($("#listview-content ul"));
                }
                loaded()});
            $("#back_to_top").click(function(e){
                myScroll.scrollToElement('#scroller li:nth-child(1)', 300)
                e.preventDefault();
                e.stopPropagation();
            });
              listSearch();
        });


    </script>
    <script id="proBcakTmpl" type="text/x-jquery-tmpl">
    {{each(i,proback) dataRows}}
          <li>
        <a data-ajax="false"  href="\${proback.url}">
	        <span class="h2"> \${proback.backDate} \${proback.proInfo} \${proback.category} \${proback.creater}</span>
            <p>
                <span>\${proback.content} [\${proback.regular}]</span>
            </p>
        </a>
    </li>
    {{/each}}
    <input type="hidden" name="pageKeyword" value="\${pageKeyword}" />
    <input type="hidden" name="pageNumber" value="\${pageNum}" />
    <input type="hidden" name="pageCount" value="\${pageCount}" />
    <input type="hidden" name="totalCount" value="\${totalCount}" />
</script>
</head>
<body>
<!-- class="jqm-demos" -->
<div data-role="page" >
    <div data-role="header" data-position="fixed" data-theme="a">
        <%--<h1 style="float:left;margin: 0 10px;"><i class="fa fa-check-square"></i> 当前项目</h1>--%>
        <!-- 新建按钮 -->
        <jsp:include page="../../../main/mp/actions-popup.jsp"	/>
        <div id="search" class="ui-field-contain"  style="margin:0;padding:0;">
            <input type="search" name="search-mini" placeholder="按项目名称搜索"id="search-mini" value=""  placeholder="按项目名称搜索"/>
            <a href="javascript:void(0)" id="search-button"  data-ajax="false" class="ui-btn" >查询</a>
        </div>
    </div><!-- /header -->
    <div style="top:83px;" class="ui-content jqm-content jqm-fullwidth" role="main" id="listview-content"
         mp-url="<%=path%>/mp/ajax-proback/list" >
        <!-- 固定视图滚动区域 -->
        <div id="scroller">
            <!-- 下拉按钮 new -->
            <div id="pullDown">
                <span class="pullDownIcon"></span> <span class="pullDownLabel">下拉松开刷新...</span>
            </div>
            <ul data-role="listview" data-theme="a" data-dividertheme="b"
                mp-page="1" mp-keyword="">

            </ul>
            <hr />
            <div>
					<span class="ui-btn-inline" style="margin:2px 12px">
						页数  <span key="pageNumber"></span>/<span key="pageCount"></span> 共<span key="totalCount"></span>条
					</span>
            </div>
            <!-- 上拉按钮 new -->
            <div id="pullUp">
                <span class="pullUpIcon"></span><span class="pullUpLabel">上拉显示更多...</span>
            </div>
        </div>
    </div><!-- /content -->

    <!-- nav 导航 -->
    <jsp:include page="../../../main/mp/nav-panel.jsp"	/>

</div><!-- /page -->
</body>
</html>

<script type="text/javascript">
    $("#search-button").off("click").on("click",function(){
      $("#listview-content").attr("mp-url", "ajax-proback!list.action?searchString="+$("#search-mini").val());

    });
    wx.config({
        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
        appId: '${jsapiSignature.appId}', // 必填，公众号的唯一标识
        timestamp: '${jsapiSignature.timestamp}', // 必填，生成签名的时间戳
        nonceStr: '${jsapiSignature.noncestr}', // 必填，生成签名的随机串
        signature: '${jsapiSignature.noncestr}',// 必填，签名，见附录1
        jsApiList: ['checkJsApi', 'getLocation'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    });
</script>